<template>
	<!-- title部分 -->
	<view class="title">
		<view class="title_leftbox" @click="goToWode">
			<image class="title_leftbox_image_fanhui" src="../../static/返回.png"></image>
		</view>
		<view class="title_middlebox">
			<view class="title_middlebox_text">帮助中心</view>
		</view>
		<view class="title_rightbox">
			<!-- <image class="title_rightbox_img" src="../../static/wenhao.png"></image> -->
		</view>
	</view>
	<!-- 内容bufen -->
	<view class="bzzxnr">
		<view class="bzzxnrbox">
			<view class="bzzxnrbox_textimgbox">
				<image class="bzzxnrbox_textimgbox_img" src="../../static/bzzx_zjaq.png"></image>
				<view class="bzzxnrbox_textimgbox_text">资金安全</view>
			</view>

			<view class="bzzxnrbox_textimgbox">
				<image class="bzzxnrbox_textimgbox_img" src="../../static/bzzx_gcbz.png"></image>
				<view class="bzzxnrbox_textimgbox_text">购彩保障</view>
			</view>

			<view class="bzzxnrbox_textimgbox">
				<image class="bzzxnrbox_textimgbox_img" src="../../static/bzzx_tkbj.png"></image>
				<view class="bzzxnrbox_textimgbox_text">提款便携</view>
			</view>
		</view>
	</view>

	<!-- 问题类型 -->
	<view class="wentileixinbox">
		<view class="wentileixinbox_text">问题类型</view>
		<view class="wentileixinbox1">
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_zhuce.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">注册</view>
			</view>
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_chongzhi.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">充值</view>
			</view>
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_goucai.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">购彩</view>
			</view>
		</view>


		<view class="wentileixinbox1">
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_zhongjiang.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">中奖</view>
			</view>
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_tikuan.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">提款</view>
			</view>
			<view class="wentileixinbox_imgtextbox">
				<image class="view wentileixinbox_imgtextbox_img" src="../../static/bzzx_qita.png"></image>
				<view class="view wentileixinbox_imgtextbox_text">其他</view>
			</view>
		</view>
	</view>
	<!-- 常见问题部分 -->
	<!-- 	<view class="changjianwenti">
		<view class="changjianwentibox">
			
			
			<view class="changjianwenti_imgtextbox">
				<image class="changjianwenti_imgtextbox_img" src="../../static/daosanjiao.png"></image>
				<view class="changjianwenti_imgtextbox_text">充值提示超限,或者提示无法向该商户付款</view>
			</view>
			<view class="changjianwenti_imgtextbox">
				<image class="changjianwenti_imgtextbox_img" src="../../static/daosanjiao.png"></image>
				<view class="changjianwenti_imgtextbox_text">延期、中断、取消的比赛,如何算奖</view>
			</view>
			<view class="changjianwenti_imgtextbox">
				<image class="changjianwenti_imgtextbox_img" src="../../static/daosanjiao.png"></image>
				<view class="changjianwenti_imgtextbox_text">中奖奖金如何扣税</view>
			</view>
			<view class="changjianwenti_imgtextbox">
				<image class="changjianwenti_imgtextbox_img" src="../../static/daosanjiao.png"></image>
				<view class="changjianwenti_imgtextbox_text">关于提款手续费</view>
			</view>
		</view>
	</view> -->



	<!-- 常见问题部分 -->
	<view class="changjianwenti">
		<view class="changjianwentibox_text">常见问题</view>
		<view class="changjianwentibox" v-for="(item, index) in questions" :key="index">
			<view class="changjianwenti_imgtextbox" @click="toggle(index)">
				<image class="changjianwenti_imgtextbox_img" src="../../static/daosanjiao.png"></image>
				<view class="changjianwenti_imgtextbox_text">{{ item.question }}</view>
			</view>
			<view class="changjianwenti_textbox" v-if="item.expanded">
				<view class="changjianwentibox_text2" v-for="(line, lineIndex) in item.answer" :key="lineIndex">
					{{ line }}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 问题数组，每个问题对象包含问题文本、答案数组和是否展开的状态
				questions: [{
						question: "充值提示超限,或者提示无法向该商户付款",
						answer: [
							"111111111111111111111111111111111111111"
						],
						expanded: false
					},
					{
						question: "延期、中断、取消的比赛,如何算奖",
						answer: [
							"2222222222222222222222222222",
							"2222222222222222222222222222222222"
						],
						expanded: false
					},
					{
						question: "中奖奖金如何扣税",
						answer: [
							"33333333333333333333333333333333333333333333",
						],
						expanded: false
					},
					{
						question: "关于提款手续费？",
						answer: [
							"444444444444444",
							"444444444444444",
							"444444444444444",
						],
						expanded: false
					}
				]
			}
		},
		methods: {
			goToWode() {
				// 在tabbar中使用uniapp的switchTab方法跳转
				uni.switchTab({
					url: '/pages/wode/wode', // 我的路径
				});
			},
			toggle(index) {
				// 切换对应问题的状态
				this.questions[index].expanded = !this.questions[index].expanded;
			}

		}
	}
</script>

<style>
	page {
		background-color: #f9f9f9;
	}

	/* 以下是title部分样式 */
	.title {
		background-color: rgb(226, 50, 52);
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* 使左右盒子分别位于两侧 */
		padding: 2%;
	}

	.title_leftbox {
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使图标居中 */
	}

	.title_leftbox_image_fanhui {
		width: 20px;
		height: 25px;
	}

	.title_middlebox {
		flex-grow: 1;
		/* 使中间盒子占据剩余空间 */
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使文本居中 */
	}

	.title_middlebox_text {
		font-size: 15px;
		color: white;
		font-weight: 700;
	}

	.title_rightbox {
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使文本居中 */
	}

	/* 
	.title_rightbox_img {
		width: 22px;
		display: block;
		height: 22px;
	} */


	/* 帮助中心内容部分 */
	.bzzxnrbox {
		padding: 2%;
		display: flex;
		background: url(https://hlgcm.yxxoaszz.com/static/img/bg.8370b990.png) no-repeat bottom;
		height: 17vh;
	}

	.bzzxnrbox_textimgbox {
		flex: 1;
	}

	.bzzxnrbox_textimgbox_img {
		width: 54px;
		height: 45px;
		display: block;
		margin: 0 auto 5px;
	}

	.bzzxnrbox_textimgbox_text {
		font-size: 15px;
		text-align: center;
		color: #fff;
	}

	/* 问题类型部分样式 */
	.wentileixinbox {
		padding: 2%;
	}

	.wentileixinbox_text {
		font-size: 16px;
		font-weight: 700;
		/* margin-bottom: 2%; */
		padding: 2%;
	}

	.wentileixinbox1 {
		display: flex;
		width: 90%;
	}

	.wentileixinbox_imgtextbox {
		display: flex;
		width: 30%;
		padding: 2%;
	}



	.wentileixinbox_imgtextbox_img {
		width: 22px;
		height: 22px;
		display: block;
		margin-right: 15%;
	}

	.wentileixinbox_imgtextbox_text {
		font-size: 15px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* 常见问题部分样式 */
	.changjianwenti {
		/* padding: 2%; */
	}

	.changjianwentibox {
		padding: 2%;
	}

	.changjianwentibox_text {
		font-size: 16px;
		font-weight: 700;
		/* margin-bottom: 2%; */
		padding: 2%;
	}

	.changjianwenti_imgtextbox {
		display: flex;
		/* 		    margin-bottom: 5%; */
		align-items: center;
		padding: 0px 2%;
		/* padding: 8px; */
		color: #8f8f8f;
		border-bottom: 1px solid #eee;
		font-size: 16px;
	}

	.changjianwenti_imgtextbox_img {
		width: 15px;
		height: 15px;
		display: block;
		margin-right: 3%;
	}

	.changjianwentibox_text2 {
		font-size: 16px;
		color: #8f8f8f;
		padding: 2%;
		line-height: 30px;
	}
</style>
